package com.example.user.config;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

@Validated
@ConfigurationProperties("sms.code")
@Data
public class SmsCodeProperties {

    @NotEmpty
    private String template;
    private Integer length = 6;
    private Integer expireSeconds = 300;

    @Valid
    private CodeFrequency codeFrequency;
}
